import { View } from '@tarojs/components'

interface CardProps {
  code: string,
  desc: string,
  children?: any
}

export default function Card({code, desc, children}: CardProps) {
  return (
    <View className='box'>
      <View className='annotation'>
        <View className='code'>{code}</View>
        <View className='desc'>{desc}</View>
      </View>
      <View className='playground'>
        {children}
      </View>
    </View>
  )
}